{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "a04f0d9a",
   "metadata": {},
   "source": [
    "### 爬取目标\n",
    "\n",
    "https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=0&type=T\n",
    "\n",
    "URL形式：\n",
    "- https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=0&type=T\n",
    "- https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=20&type=T\n",
    "- https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=940&type=T\n",
    "\n",
    "特点：start=0开始，每页20个，一直到960；"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3894eaa0",
   "metadata": {},
   "source": [
    "### 制作headers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "d7618d2a",
   "metadata": {},
   "outputs": [],
   "source": [
    "headers = {\n",
    "    \"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36\",\n",
    "    \"Cookie\": \"\"\"ll=\"108288\"; bid=6SRIJf9RHO8; __gads=ID=c090aca7e1d9d44f-22e75099c5d0000c:T=1646036779:RT=1646036779:S=ALNI_MbqHJYFl5BeK8Ed-2eaGgsVJOPB5g; _ga=GA1.2.1831785333.1646036751; gr_user_id=411913a4-f283-4a75-9d98-72de05853ad7; _vwo_uuid_v2=D19AA7E1DCCA7DE01C93EDA2C5448024B|8d74454d93108f017b3ee438a39d20a0; __yadk_uid=TAuYyUjofn32xr3xknFS1aA4GpgRhM8h; ct=y; viewed=\"33386709_30150912_26708820_35196328_35387685_30293801_27667378_30283996_30203158_26870407\"; __utmc=30149280; ap_v=0,6.0; __utmc=81379588; dbcl2=\"58987366:I2QgKwQtk9U\"; ck=Mdpp; _pk_ref.100001.3ac3=%5B%22%22%2C%22%22%2C1647248191%2C%22https%3A%2F%2Faccounts.douban.com%2F%22%5D; _pk_id.100001.3ac3=f3c1a451858fe451.1646732542.5.1647248191.1647245974.; _pk_ses.100001.3ac3=*; _dd_s=logs=1&id=f2bdc779-f5d2-482e-bc0b-4895895d8868&created=1647248191771&expire=1647249093059; __utma=30149280.1831785333.1646036751.1647243447.1647248196.7; __utmz=30149280.1647248196.7.3.utmcsr=accounts.douban.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utmt_douban=1; __utmb=30149280.1.10.1647248196; __utmz=81379588.1647248196.5.5.utmcsr=accounts.douban.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utmt=1; __utma=81379588.1831785333.1646036751.1647243451.1647248192.5; __utmb=81379588.1.10.1647248196; push_noty_num=0; push_doumail_num=0\"\"\"\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b50108d2",
   "metadata": {},
   "source": [
    "### 请求单个网页"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "ac100374",
   "metadata": {},
   "outputs": [],
   "source": [
    "url = \"https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=0&type=T\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4434578a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3bd09ef0",
   "metadata": {},
   "outputs": [],
   "source": [
    "resp = requests.get(url, headers=headers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "1c3d7286",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "200"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "resp.status_code"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a00ca297",
   "metadata": {},
   "outputs": [],
   "source": [
    "data = resp.text"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "3b315df3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "52585"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "3cc7f888",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\n\\n<!DOCTYPE html>\\n<html lang=\"zh-cmn-Hans\" class=\"ua-mac ua-webkit book-new-nav\">\\n<head>\\n  <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\\n  <title>\\n  豆瓣图书标签: 编程\\n</title>\\n  \\n<script>!function(e){var o=function(o,n,t){var c,i,r=new Date;n=n||30,t=t||\"/\",r.setTime(r.getTime()+24*n*60*60*1e3),c=\"; expires=\"+r.toGMTString();for(i in o)e.cookie=i+\"=\"+o[i]+c+\"; path=\"+t},n=function(o){var n,t,c,i=o+\"=\",r=e.cookie.split(\";\");for(t=0,c=r.length;t<c;t++)if(n=r[t].replace(/^\\\\s+|\\\\s+$/g,\"\"),0==n.indexOf(i))return n.substring(i.length,n.length).replace(/\\\\\"/g,\"\");return null},t=e.write,c={\"douban.com\":1,\"douban.fm\":1,\"google.com\":1,\"google.cn\":1,\"googleapis.com\":1,\"gmaptiles.co.kr\":1,\"gstatic.com\":1,\"gstatic.cn\":1,\"google-analytics.com\":1,\"googleadservices.com\":1},i=function(e,o){var n=new Image;n.onload=function(){},n.src=\"https://www.douban.com/j/except_report?kind=ra022&reason=\"+encodeURIComponent(e)+\"&environment=\"+encodeURIComponent(o)},r=function(o){try{t.call(e,o)}catch(e){t(o)}},a=/<script.*?src\\\\=[\"\\']?([^\"\\'\\\\s>]+)/gi,g=/http:\\\\/\\\\/(.+?)\\\\.([^\\\\/]+).+/i;e.writeln=e.write=function(e){var t,l=a.exec(e);return l&&(t=g.exec(l[1]))?c[t[2]]?void r(e):void(\"tqs\"!==n(\"hj\")&&(i(l[1],location.href),o({hj:\"tqs\"},1),setTimeout(function(){location.replace(location.href)},50))):void r(e)}}(document);</script>\\n\\n  \\n  <meta http-equiv=\"Pragma\" content=\"no-cache\">\\n  <meta http-equiv=\"Expires\" content=\"Sun, 6 Mar 2005 01:00:00 GMT\">\\n  \\n  <script>var _head_start = new Date();</script>\\n  \\n  <link href=\"https://img3.doubanio.com/f/book/8011541306494bc2ff483299d952d9c65753c43d/css/book/master.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n  <link href=\"https://img3.doubanio.com/f/book/222a5c61e041638af8defc87cf97f4a863a77922/css/book/base/init.css\" rel=\"stylesheet\">\\n  <style type=\"text/css\"></style>\\n  <script src=\"https://img3.doubanio.com/f/book/0495cb173e298c28593766009c7b0a953246c5b5/js/book/lib/jquery/jquery.js\"></script>\\n  <script src=\"https://img3.doubanio.com/f/shire/22ee83f45f94c7a90e73e0ee4acd18f902a6991f/js/douban.js\"></script>\\n  <script src=\"https://img3.doubanio.com/f/book/0322e3e810e475f1c82adb7d1c6ccfa1c0fa969c/js/book/master.js\"></script>\\n  \\n\\n  \\n  <script>  </script>\\n  <link rel=\"stylesheet\" href=\"https://img3.doubanio.com/misc/mixed_static/28fc3e84f96f7794.css\">\\n\\n  <link rel=\"shortcut icon\" href=\"https://img3.doubanio.com/favicon.ico\" type=\"image/x-icon\">\\n</head>\\n<body>\\n  \\n    <script>var _body_start = new Date();</script>\\n    \\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/shire/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n<div id=\"db-global-nav\" class=\"global-nav\">\\n  <div class=\"bd\">\\n    \\n<div class=\"top-nav-info\">\\n  <a href=\"https://accounts.douban.com/passport/login?source=book\" class=\"nav-login\" rel=\"nofollow\">登录/注册</a>\\n</div>\\n\\n\\n    <div class=\"top-nav-doubanapp\">\\n  <a href=\"https://www.douban.com/doubanapp/app?channel=top-nav\" class=\"lnk-doubanapp\">下载豆瓣客户端</a>\\n  <div id=\"doubanapp-tip\">\\n    <a href=\"https://www.douban.com/doubanapp/app?channel=qipao\" class=\"tip-link\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>\\n    <a href=\"javascript: void 0;\" class=\"tip-close\">×</a>\\n  </div>\\n  <div id=\"top-nav-appintro\" class=\"more-items\">\\n    <p class=\"appintro-title\">豆瓣</p>\\n    <p class=\"qrcode\">扫码直接下载</p>\\n    <div class=\"download\">\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=iOS\">iPhone</a>\\n      <span>·</span>\\n      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=Android\" class=\"download-android\">Android</a>\\n    </div>\\n  </div>\\n</div>\\n\\n    \\n\\n\\n<div class=\"global-nav-items\">\\n  <ul>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-main&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆瓣</a>\\n    </li>\\n    <li class=\"on\">\\n      <a href=\"https://book.douban.com\"  data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-book&quot;,&quot;uid&quot;:&quot;0&quot;}\">读书</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://movie.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-movie&quot;,&quot;uid&quot;:&quot;0&quot;}\">电影</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://music.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-music&quot;,&quot;uid&quot;:&quot;0&quot;}\">音乐</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/location\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-location&quot;,&quot;uid&quot;:&quot;0&quot;}\">同城</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://www.douban.com/group\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-group&quot;,&quot;uid&quot;:&quot;0&quot;}\">小组</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://read.douban.com&#47;?dcs=top-nav&amp;dcm=douban\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-read&quot;,&quot;uid&quot;:&quot;0&quot;}\">阅读</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://douban.fm&#47;?from_=shire_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-fm&quot;,&quot;uid&quot;:&quot;0&quot;}\">FM</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://time.douban.com&#47;?dt_time_source=douban-web_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-time&quot;,&quot;uid&quot;:&quot;0&quot;}\">时间</a>\\n    </li>\\n    <li class=\"\">\\n      <a href=\"https://market.douban.com&#47;?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-market&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆品</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n  </div>\\n</div>\\n<script>\\n  ;window._GLOBAL_NAV = {\\n    DOUBAN_URL: \"https://www.douban.com\",\\n    N_NEW_NOTIS: 0,\\n    N_NEW_DOUMAIL: 0\\n  };\\n</script>\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/shire/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n  \\n\\n\\n\\n    <link href=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/book/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\\n\\n\\n\\n\\n<div id=\"db-nav-book\" class=\"nav\">\\n  <div class=\"nav-wrap\">\\n  <div class=\"nav-primary\">\\n    <div class=\"nav-logo\">\\n      <a href=\"https:&#47;&#47;book.douban.com\">豆瓣读书</a>\\n    </div>\\n    <div class=\"nav-search\">\\n      <form action=\"https:&#47;&#47;search.douban.com&#47;book/subject_search\" method=\"get\">\\n        <fieldset>\\n          <legend>搜索：</legend>\\n          <label for=\"inp-query\">\\n          </label>\\n          <div class=\"inp\"><input id=\"inp-query\" name=\"search_text\" size=\"22\" maxlength=\"60\" placeholder=\"书名、作者、ISBN\" value=\"\"></div>\\n          <div class=\"inp-btn\"><input type=\"submit\" value=\"搜索\"></div>\\n          <input type=\"hidden\" name=\"cat\" value=\"1001\" />\\n        </fieldset>\\n      </form>\\n    </div>\\n  </div>\\n  </div>\\n  <div class=\"nav-secondary\">\\n    \\n\\n<div class=\"nav-items\">\\n  <ul>\\n    <li    ><a href=\"https://book.douban.com/cart/\"\\n     >购书单</a>\\n    </li>\\n    <li    ><a href=\"https://read.douban.com/ebooks/?dcs=book-nav&dcm=douban\"\\n            target=\"_blank\"\\n     >电子图书</a>\\n    </li>\\n    <li    ><a href=\"https://market.douban.com/book?utm_campaign=book_nav_freyr&utm_source=douban&utm_medium=pc_web\"\\n     >豆瓣书店</a>\\n    </li>\\n    <li    ><a href=\"https://book.douban.com/annual/2021?source=navigation\"\\n            target=\"_blank\"\\n     >2021年度榜单</a>\\n    </li>\\n    <li    ><a href=\"https://www.douban.com/standbyme/2021?fullscreen=true&hidenav=true&autorotate=false&source=book_navigation\"\\n            target=\"_blank\"\\n     >2021书影音报告</a>\\n    </li>\\n    <li          class=\" book-cart\"\\n    ><a href=\"https://market.douban.com/cart/?biz_type=book&utm_campaign=book_nav_cart&utm_source=douban&utm_medium=pc_web\"\\n            target=\"_blank\"\\n     >购物车</a>\\n    </li>\\n  </ul>\\n</div>\\n\\n    <a href=\"https://book.douban.com/annual/2021?source=book_navigation\" class=\"bookannual\"></a>\\n  </div>\\n</div>\\n\\n<script id=\"suggResult\" type=\"text/x-jquery-tmpl\">\\n  <li data-link=\"{{= url}}\">\\n            <a href=\"{{= url}}\" onclick=\"moreurl(this, {from:\\'book_search_sugg\\', query:\\'{{= keyword }}\\', subject_id:\\'{{= id}}\\', i: \\'{{= index}}\\', type: \\'{{= type}}\\'})\">\\n            <img src=\"{{= pic}}\" width=\"40\" />\\n            <div>\\n                <em>{{= title}}</em>\\n                {{if year}}\\n                    <span>{{= year}}</span>\\n                {{/if}}\\n                <p>\\n                {{if type == \"b\"}}\\n                    {{= author_name}}\\n                {{else type == \"a\" }}\\n                    {{if en_name}}\\n                        {{= en_name}}\\n                    {{/if}}\\n                {{/if}}\\n                 </p>\\n            </div>\\n        </a>\\n        </li>\\n  </script>\\n\\n\\n\\n\\n    <script src=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/book/bundle.js\" defer=\"defer\"></script>\\n\\n\\n\\n\\n\\n    <div id=\"wrapper\">\\n        \\n        \\n  <div id=\"content\">\\n    \\n    <h1>豆瓣图书标签: 编程</h1>\\n\\n    <div class=\"grid-16-8 clearfix\">\\n      \\n      <div class=\"article\">\\n  <div id=\"subject_list\">\\n\\n      \\n  \\n  \\n  <div class=\"clearfix\">\\n    <span class=\"rr greyinput\">\\n\\n          综合排序\\n          &nbsp;/&nbsp;\\n\\n          <a href=\"/tag/%E7%BC%96%E7%A8%8B?type=R\">按出版日期排序</a>\\n          &nbsp;/&nbsp;\\n\\n          <a href=\"/tag/%E7%BC%96%E7%A8%8B?type=S\">按评价排序</a>\\n    </span>\\n  </div>\\n\\n\\n\\n    \\n  \\n  <ul class=\"subject-list\">\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/3227098/\" \\n  onclick=\"moreurl(this,{i:\\'0\\',query:\\'\\',subject_id:\\'3227098\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img2.doubanio.com/view/subject/s/public/s4687321.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/3227098/\" title=\"编程珠玑\" \\n  onclick=\"moreurl(this,{i:\\'0\\',query:\\'\\',subject_id:\\'3227098\\',from:\\'book_subject_search\\'})\">\\n\\n    编程珠玑\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Jon Bentley / 黄倩、钱丽艳、刘田(审校) / 人民邮电出版社 / 2008-10 / 39.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.1</span>\\n\\n    <span class=\"pl\">\\n        (2174人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书是计算机科学方面的经典名著。书的内容围绕程序设计人员面对的一系列实际问题展开。作者Jon Bentley 以其独有的洞察力和创造力，引导读者理解这些问题... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35768338/\" \\n  onclick=\"moreurl(this,{i:\\'1\\',query:\\'\\',subject_id:\\'35768338\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s34120804.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35768338/\" title=\"Vue.js设计与实现\" \\n  onclick=\"moreurl(this,{i:\\'1\\',query:\\'\\',subject_id:\\'35768338\\',from:\\'book_subject_search\\'})\">\\n\\n    Vue.js设计与实现\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  霍春阳 / 2022-2-10\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.2</span>\\n\\n    <span class=\"pl\">\\n        (60人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书基于Vue.js 3，从规范出发，以源码为基础，并结合大量直观的配图，循序渐进地讲解Vue.js中各个功能模块的实现，细致剖析框架设计原理。全书共18章... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/30468597/\" \\n  onclick=\"moreurl(this,{i:\\'2\\',query:\\'\\',subject_id:\\'30468597\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img2.doubanio.com/view/subject/s/public/s30014452.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/30468597/\" title=\"重构（第2版）\" \\n  onclick=\"moreurl(this,{i:\\'2\\',query:\\'\\',subject_id:\\'30468597\\',from:\\'book_subject_search\\'})\">\\n\\n    重构（第2版）\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 改善既有代码的设计 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Martin Fowler / 熊节、林从羽 / 人民邮电出版社 / 2019-3 / 168.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.1</span>\\n\\n    <span class=\"pl\">\\n        (321人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书是经典著作《重构》出版20年后的更新版。书中清晰揭示了重构的过程，解释了重构的原理和实践方式，并给出了何时以及何地应该开始挖掘代码以求改善。书中给出了6... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n    <span class=\"buy-info\">\\n      <a href=\"https://book.douban.com/subject/30468597/buylinks\">\\n        纸质版 132.70元\\n      </a>\\n    </span>\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35196328/\" \\n  onclick=\"moreurl(this,{i:\\'3\\',query:\\'\\',subject_id:\\'35196328\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img1.doubanio.com/view/subject/s/public/s33716278.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35196328/\" title=\"Python编程\" \\n  onclick=\"moreurl(this,{i:\\'3\\',query:\\'\\',subject_id:\\'35196328\\',from:\\'book_subject_search\\'})\">\\n\\n    Python编程\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 从入门到实践（第2版） </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美]埃里克·马瑟斯（Eric Matthes） / 袁国忠 / 人民邮电出版社 / 2020-10 / 89\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.2</span>\\n\\n    <span class=\"pl\">\\n        (894人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书是针对所有层次Python读者而作的Python入门书。全书分两部分：第一部分介绍用Python编程所必须了解的基本概念，包括Matplotlib等强大... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n    <span class=\"buy-info\">\\n      <a href=\"https://book.douban.com/subject/35196328/buylinks\">\\n        纸质版 86.60元\\n      </a>\\n    </span>\\n\\n          </div>\\n\\n            \\n            \\n  \\n    \\n    \\n  <div class=\"ebook-link\">\\n    <a target=\"_blank\" href=\"https://read.douban.com/ebook/337008762/?dcs=tag-buylink&amp;dcm=douban&amp;dct=35196328\">去看电子版</a>\\n  </div>\\n  \\n\\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/4822685/\" \\n  onclick=\"moreurl(this,{i:\\'4\\',query:\\'\\',subject_id:\\'4822685\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img2.doubanio.com/view/subject/s/public/s27331702.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/4822685/\" title=\"编码\" \\n  onclick=\"moreurl(this,{i:\\'4\\',query:\\'\\',subject_id:\\'4822685\\',from:\\'book_subject_search\\'})\">\\n\\n    编码\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 隐匿在计算机软硬件背后的语言 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Charles Petzold / 左飞、薛佟佟 / 电子工业出版社 / 2010 / 55.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.3</span>\\n\\n    <span class=\"pl\">\\n        (4540人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书讲述的是计算机工作原理。作者用丰富的想象和清晰的笔墨将看似繁杂的理论阐述得通俗易懂，你丝毫不会感到枯燥和生硬。更重要的是，你会因此而获得对计算机工作原理... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n    <span class=\"buy-info\">\\n      <a href=\"https://book.douban.com/subject/4822685/buylinks\">\\n        纸质版 46.10元\\n      </a>\\n    </span>\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/34898994/\" \\n  onclick=\"moreurl(this,{i:\\'5\\',query:\\'\\',subject_id:\\'34898994\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img2.doubanio.com/view/subject/s/public/s33556751.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/34898994/\" title=\"Java核心技术·卷 I（原书第11版）\" \\n  onclick=\"moreurl(this,{i:\\'5\\',query:\\'\\',subject_id:\\'34898994\\',from:\\'book_subject_search\\'})\">\\n\\n    Java核心技术·卷 I（原书第11版）\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 基础知识 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] 凯 S.霍斯特曼（Cay S.Horstmann） / 林琪、苏钰涵 / 机械工业出版社 / 2019-11-25 / 149元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.4</span>\\n\\n    <span class=\"pl\">\\n        (242人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书由拥有20多年教学与研究经验的资深Java技术专家撰写（获Jolt大奖），是程序员的优选Java指南。本版针对Java SE 9、10和 11全面更新。... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n    <span class=\"buy-info\">\\n      <a href=\"https://book.douban.com/subject/34898994/buylinks\">\\n        纸质版 122.90元\\n      </a>\\n    </span>\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/26912767/\" \\n  onclick=\"moreurl(this,{i:\\'6\\',query:\\'\\',subject_id:\\'26912767\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img1.doubanio.com/view/subject/s/public/s29195878.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/26912767/\" title=\"深入理解计算机系统（原书第3版）\" \\n  onclick=\"moreurl(this,{i:\\'6\\',query:\\'\\',subject_id:\\'26912767\\',from:\\'book_subject_search\\'})\">\\n\\n    深入理解计算机系统（原书第3版）\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  Randal E.Bryant、David O&#39;Hallaron / 龚奕利、贺莲 / 机械工业出版社 / 2016-11 / 139.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar50\"></span>\\n        <span class=\"rating_nums\">9.8</span>\\n\\n    <span class=\"pl\">\\n        (1833人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>和第2版相比，本版内容上*大的变化是，从以IA32和x86-64为基础转变为完全以x86-64为基础。主要更新如下：\\n基于x86-64，大量地重写代码，首次... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n              <span class=\"market-info\">\\n                <a href=\"https://book.douban.com/subject/26912767/?channel=subject_list&amp;platform=web\" target=\"_blank\">在豆瓣购买</a>\\n              </span>\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/26829016/\" \\n  onclick=\"moreurl(this,{i:\\'7\\',query:\\'\\',subject_id:\\'26829016\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s28891775.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/26829016/\" title=\"Python编程\" \\n  onclick=\"moreurl(this,{i:\\'7\\',query:\\'\\',subject_id:\\'26829016\\',from:\\'book_subject_search\\'})\">\\n\\n    Python编程\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 从入门到实践 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] 埃里克·马瑟斯 / 袁国忠 / 人民邮电出版社 / 2016-7-1 / 89.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.1</span>\\n\\n    <span class=\"pl\">\\n        (3815人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书是一本针对所有层次的Python 读者而作的Python 入门书。全书分两部分：第一部分介绍用Python 编程所必须了解的基本概念，包括matplot... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n    \\n    \\n  <div class=\"ebook-link\">\\n    <a target=\"_blank\" href=\"https://read.douban.com/ebook/122163837/?dcs=tag-buylink&amp;dcm=douban&amp;dct=26829016\">去看电子版</a>\\n  </div>\\n  \\n\\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35723705/\" \\n  onclick=\"moreurl(this,{i:\\'8\\',query:\\'\\',subject_id:\\'35723705\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s34093255.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35723705/\" title=\"Python工匠\" \\n  onclick=\"moreurl(this,{i:\\'8\\',query:\\'\\',subject_id:\\'35723705\\',from:\\'book_subject_search\\'})\">\\n\\n    Python工匠\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 案例、技巧与工程实践 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  朱雷（@piglei） / 图灵｜人民邮电出版社\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar00\"></span>\\n        <span class=\"rating_nums\"></span>\\n\\n    <span class=\"pl\">\\n        (33人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>◎ 编辑推荐\\n☆本书基于作者的开源GitHub图书，广受读者喜爱，市面上难得的原创Python进阶图书。\\n☆写作方式别具一格，核心知识点通过三大板块来阐述：... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35492898/\" \\n  onclick=\"moreurl(this,{i:\\'9\\',query:\\'\\',subject_id:\\'35492898\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img1.doubanio.com/view/subject/s/public/s33966407.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35492898/\" title=\"凤凰架构\" \\n  onclick=\"moreurl(this,{i:\\'9\\',query:\\'\\',subject_id:\\'35492898\\',from:\\'book_subject_search\\'})\">\\n\\n    凤凰架构\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 构建可靠的大型分布式系统 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  周志明 / 机械工业出版社 / 2021-6-30 / 99.00\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.1</span>\\n\\n    <span class=\"pl\">\\n        (327人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>这是一本从架构视角讲解如何构建大型分布式系统的著作，是超级畅销书《深入理解Java虚拟机》的作者周志明多年架构和研发经验的总结，得到了多位行业资深架构专家的... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n    \\n    \\n  <div class=\"ebook-link\">\\n    <a target=\"_blank\" href=\"https://read.douban.com/ebook/322751253/?dcs=tag-buylink&amp;dcm=douban&amp;dct=35492898\">去看电子版</a>\\n  </div>\\n  \\n\\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/1148282/\" \\n  onclick=\"moreurl(this,{i:\\'10\\',query:\\'\\',subject_id:\\'1148282\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s1113106.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/1148282/\" title=\"计算机程序的构造和解释(原书第2版)\" \\n  onclick=\"moreurl(this,{i:\\'10\\',query:\\'\\',subject_id:\\'1148282\\',from:\\'book_subject_search\\'})\">\\n\\n    计算机程序的构造和解释(原书第2版)\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Harold Abelson、[美] Gerald Jay Sussman、[美] Julie Sussman / 裘宗燕 / 机械工业出版社 / 2004-2 / 45.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar50\"></span>\\n        <span class=\"rating_nums\">9.5</span>\\n\\n    <span class=\"pl\">\\n        (2572人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>《计算机程序的构造和解释》成型于美国麻省理工学院（MIT）多年使用的一本教材，1984年出版，1996年修订为第二版。在过去的二十多年里，该书对于计算机科学... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/30412517/\" \\n  onclick=\"moreurl(this,{i:\\'11\\',query:\\'\\',subject_id:\\'30412517\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img3.doubanio.com/view/subject/s/public/s32282160.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/30412517/\" title=\"Effective Java中文版（第3版）\" \\n  onclick=\"moreurl(this,{i:\\'11\\',query:\\'\\',subject_id:\\'30412517\\',from:\\'book_subject_search\\'})\">\\n\\n    Effective Java中文版（第3版）\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Joshua Bloch / 俞黎敏 / 机械工业出版社 / 2018-12-11 / 119元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.3</span>\\n\\n    <span class=\"pl\">\\n        (270人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书一共包含90个条目，每个条目讨论Java程序设计中的一条规则。这些规则反映了最有经验的优秀程序员在实践中常用的一些有益的做法。\\n全书以一种比较松散的方式... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/1139336/\" \\n  onclick=\"moreurl(this,{i:\\'12\\',query:\\'\\',subject_id:\\'1139336\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s1106934.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/1139336/\" title=\"C程序设计语言（第2版·新版）\" \\n  onclick=\"moreurl(this,{i:\\'12\\',query:\\'\\',subject_id:\\'1139336\\',from:\\'book_subject_search\\'})\">\\n\\n    C程序设计语言（第2版·新版）\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Brian W. Kernighan、[美] Dennis M. Ritchie / 徐宝文、李志译、尤晋元审校 / 机械工业出版社 / 2004-1 / 30.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.4</span>\\n\\n    <span class=\"pl\">\\n        (4935人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>在计算机发展的历史上，没有哪一种程序设计语言像C语言这样应用广泛。本书作者是C语言的设计者之一Dennis M. Ritchie和著名计算机科学家Brian... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/27154352/\" \\n  onclick=\"moreurl(this,{i:\\'13\\',query:\\'\\',subject_id:\\'27154352\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s29559444.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/27154352/\" title=\"设计数据密集型应用（影印版）\" \\n  onclick=\"moreurl(this,{i:\\'13\\',query:\\'\\',subject_id:\\'27154352\\',from:\\'book_subject_search\\'})\">\\n\\n    设计数据密集型应用（影印版）\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  Martin Kleppmann / 东南大学出版社 / 2017-10-1 / 99.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar50\"></span>\\n        <span class=\"rating_nums\">9.9</span>\\n\\n    <span class=\"pl\">\\n        (219人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>书中包含以下内容:\\n深入分析你已经在使用的系统，并学习如何更高效地使用和运维这些系统\\n通过识别不同工具的优缺点，作出更明智的决策\\n了解一致性、可伸缩性、容错... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35029210/\" \\n  onclick=\"moreurl(this,{i:\\'14\\',query:\\'\\',subject_id:\\'35029210\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img1.doubanio.com/view/subject/s/public/s33618069.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35029210/\" title=\"Scratch趣味编程：孩子的第一本编程启蒙书 小甲鱼系列\" \\n  onclick=\"moreurl(this,{i:\\'14\\',query:\\'\\',subject_id:\\'35029210\\',from:\\'book_subject_search\\'})\">\\n\\n    Scratch趣味编程：孩子的第一本编程启蒙书 小甲鱼系列\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 小甲鱼系列 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  小甲鱼 / 清华大学出版社 / 79元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n\\n    <span class=\"pl\">\\n        (少于10人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/26681685/\" \\n  onclick=\"moreurl(this,{i:\\'15\\',query:\\'\\',subject_id:\\'26681685\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s28357866.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/26681685/\" title=\"计算机程序设计艺术・卷1\" \\n  onclick=\"moreurl(this,{i:\\'15\\',query:\\'\\',subject_id:\\'26681685\\',from:\\'book_subject_search\\'})\">\\n\\n    计算机程序设计艺术・卷1\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 基本算法（第3版） </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  Donald E. Knuth / 李伯民、范明、蒋爱军 / 人民邮电出版社 / 2016-1-1 / 198\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar50\"></span>\\n        <span class=\"rating_nums\">9.5</span>\\n\\n    <span class=\"pl\">\\n        (61人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>《计算机程序设计艺术》系列是公认的计算机科学领域经典之作，深入阐述了程序设计理论，对计算机领域的发展有着极为深远的影响。本书是该系列的第 1 卷，讲解基本算... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35334595/\" \\n  onclick=\"moreurl(this,{i:\\'16\\',query:\\'\\',subject_id:\\'35334595\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img1.doubanio.com/view/subject/s/public/s33808137.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35334595/\" title=\"Effective Python\" \\n  onclick=\"moreurl(this,{i:\\'16\\',query:\\'\\',subject_id:\\'35334595\\',from:\\'book_subject_search\\'})\">\\n\\n    Effective Python\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 编写高质量 Python 代码的 90 个有效方法（原书第 2 版） </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] 布雷特·斯拉特金 / 爱飞翔 / 机械工业出版社 / 2021-1 / 129\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.0</span>\\n\\n    <span class=\"pl\">\\n        (73人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>本书可以帮你掌握真正的 Pythonic 编程方式，令你能够完全发挥出 Python 语言的强大功能，并写出健壮而高效的代码。Scott Meyers 在畅... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n    \\n    \\n  <div class=\"ebook-link\">\\n    <a target=\"_blank\" href=\"https://read.douban.com/ebook/327370585/?dcs=tag-buylink&amp;dcm=douban&amp;dct=35334595\">去看电子版</a>\\n  </div>\\n  \\n\\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/1477390/\" \\n  onclick=\"moreurl(this,{i:\\'17\\',query:\\'\\',subject_id:\\'1477390\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img1.doubanio.com/view/subject/s/public/s1495029.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/1477390/\" title=\"代码大全（第2版）\" \\n  onclick=\"moreurl(this,{i:\\'17\\',query:\\'\\',subject_id:\\'1477390\\',from:\\'book_subject_search\\'})\">\\n\\n    代码大全（第2版）\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] 史蒂夫·迈克康奈尔 / 金戈、汤凌、陈硕、张菲 译、裘宗燕 审校 / 电子工业出版社 / 2006-3 / 128.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.3</span>\\n\\n    <span class=\"pl\">\\n        (4092人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>第2版的《代码大全》是著名IT畅销书作者史蒂夫·迈克康奈尔11年前的经典著作的全新演绎：第2版不是第一版的简单修订增补，而是完全进行了重写；增加了很多与时俱... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/35641088/\" \\n  onclick=\"moreurl(this,{i:\\'18\\',query:\\'\\',subject_id:\\'35641088\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img3.doubanio.com/view/subject/s/public/s34032260.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/35641088/\" title=\"计算之魂\" \\n  onclick=\"moreurl(this,{i:\\'18\\',query:\\'\\',subject_id:\\'35641088\\',from:\\'book_subject_search\\'})\">\\n\\n    计算之魂\\n\\n\\n    \\n      <span style=\"font-size:12px;\"> : 计算科学品位和认知进阶 </span>\\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  吴军 / 人民邮电出版社 / 2021-11 / 109\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">9.4</span>\\n\\n    <span class=\"pl\">\\n        (142人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>对计算机科学的掌握程度，决定了一个计算机行业从业者能走多远。在本书中，作者将人文历史与计算机科学相结合，通过一些具体的例题，分10个主题系统地讲解了计算机科... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n      \\n      \\n  \\n  <li class=\"subject-item\">\\n    <div class=\"pic\">\\n      <a class=\"nbg\" href=\"https://book.douban.com/subject/34986245/\" \\n  onclick=\"moreurl(this,{i:\\'19\\',query:\\'\\',subject_id:\\'34986245\\',from:\\'book_subject_search\\'})\">\\n        <img class=\"\" src=\"https://img9.doubanio.com/view/subject/s/public/s33634755.jpg\"\\n          width=\"90\">\\n      </a>\\n    </div>\\n    <div class=\"info\">\\n      <h2 class=\"\">\\n        \\n  \\n  <a href=\"https://book.douban.com/subject/34986245/\" title=\"代码整洁之道\" \\n  onclick=\"moreurl(this,{i:\\'19\\',query:\\'\\',subject_id:\\'34986245\\',from:\\'book_subject_search\\'})\">\\n\\n    代码整洁之道\\n\\n\\n    \\n\\n  </a>\\n\\n      </h2>\\n      <div class=\"pub\">\\n        \\n  \\n  [美] Robert C. Martin / 韩磊 / 人民邮电出版社 / 2020-2 / 99.00元\\n\\n      </div>\\n\\n\\n        \\n  \\n  \\n  \\n  <div class=\"star clearfix\">\\n        <span class=\"allstar45\"></span>\\n        <span class=\"rating_nums\">8.7</span>\\n\\n    <span class=\"pl\">\\n        (89人评价)\\n    </span>\\n  </div>\\n\\n\\n\\n        \\n  \\n  \\n  \\n    <p>软件质量，不但依赖架构及项目管理，而且与代码质量紧密相关。这一点，无论是敏捷开发流派还是传统开发流派，都不得不承认。本书提出一种观点：代码质量与其整洁度成正... </p>\\n\\n\\n\\n\\n\\n\\n      <div class=\"ft\">\\n          \\n  <div class=\"collect-info\">\\n  </div>\\n\\n\\n          <div class=\"cart-actions\">\\n            \\n                \\n  \\n\\n    <span class=\"buy-info\">\\n      <a href=\"https://book.douban.com/subject/34986245/buylinks\">\\n        纸质版 78.00元\\n      </a>\\n    </span>\\n\\n          </div>\\n\\n            \\n            \\n  \\n\\n      </div>\\n\\n    </div>\\n  </li>\\n  \\n\\n  </ul>\\n\\n\\n      \\n    \\n    \\n    \\n        <div class=\"paginator\">\\n        <span class=\"prev\">\\n            &lt;前页\\n        </span>\\n        \\n        \\n\\n                <span class=\"thispage\">1</span>\\n                \\n            <a href=\"/tag/编程?start=20&amp;type=T\" >2</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=40&amp;type=T\" >3</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=60&amp;type=T\" >4</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=80&amp;type=T\" >5</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=100&amp;type=T\" >6</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=120&amp;type=T\" >7</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=140&amp;type=T\" >8</a>\\n        \\n                \\n            <a href=\"/tag/编程?start=160&amp;type=T\" >9</a>\\n        \\n            <span class=\"break\">...</span>\\n                \\n            <a href=\"/tag/编程?start=740&amp;type=T\" >38</a>\\n        \\n            <a href=\"/tag/编程?start=760&amp;type=T\" >39</a>\\n        \\n        <span class=\"next\">\\n            <link rel=\"next\" href=\"/tag/编程?start=20&amp;type=T\"/>\\n            <a href=\"/tag/编程?start=20&amp;type=T\" >后页&gt;</a>\\n        </span>\\n\\n        </div>\\n\\n\\n  </div>\\n</div>\\n      <div class=\"aside\">\\n        \\n  <br/>\\n  <div id=\"dale_book_tag_top_right\"></div>\\n\\n    \\n  \\n\\n  <h2>\\n    <span>相关的标签</span>\\n      &nbsp;&middot;&nbsp;&middot;&nbsp;&middot;&nbsp;&middot;&nbsp;&middot;&nbsp;&middot;\\n\\n  </h2>\\n\\n\\n    \\n  <div class=\"tags-list\">\\n      <a href=\"/tag/Programming\">Programming</a>\\n      <a href=\"/tag/计算机\">计算机</a>\\n      <a href=\"/tag/程序设计\">程序设计</a>\\n      <a href=\"/tag/C++\">C++</a>\\n      <a href=\"/tag/programming\">programming</a>\\n      <a href=\"/tag/软件开发\">软件开发</a>\\n      <a href=\"/tag/计算机科学\">计算机科学</a>\\n      <a href=\"/tag/C#\">C#</a>\\n  </div>\\n\\n\\n  \\n  <form name=\"tsp_form\" action=\"/tag/\" method=\"GET\">\\n    <input name=\"search_text\" class=\"j a_search_text\" type=\"text\" size=\"24\" maxlength=\"36\" title=\"去其他标签\" value=\"\"/>\\n    <input class=\"butt\" type=\"submit\" value=\"进入\"/>\\n  </form>\\n  <br/>\\n  <br/>\\n\\n\\n  <p class=\"pl2 mb30\">\\n    &gt; <a href=\"/tag/\">浏览全部图书标签</a>\\n  </p>\\n\\n    \\n  \\n\\n  <h2>\\n    <span>&#34;编程&#34;相关豆列</span>\\n      &nbsp;&middot;&nbsp;&middot;&nbsp;&middot;&nbsp;&middot;&nbsp;&middot;&nbsp;&middot;\\n\\n  </h2>\\n\\n\\n    \\n\\n<ul class=\"bs\">\\n  <li>\\n    <a href=\"https://www.douban.com/doulist/336424/\">编程C语言,Python等类书籍+知乎话题</a>\\n      <span class=\"pl\">(IVAN)</span>\\n  </li>\\n  <li>\\n    <a href=\"https://www.douban.com/doulist/430092/\">数学计算机专业书籍</a>\\n      <span class=\"pl\">(万籁君)</span>\\n  </li>\\n  <li>\\n    <a href=\"https://www.douban.com/doulist/172288/\">计算机理论</a>\\n      <span class=\"pl\">(mashan_snail)</span>\\n  </li>\\n  <li>\\n    <a href=\"https://www.douban.com/doulist/85050/\">【C/C++学习指南】</a>\\n      <span class=\"pl\">(小李飞刀)</span>\\n  </li>\\n  <li>\\n    <a href=\"https://www.douban.com/doulist/1525602/\">Hack的技术与艺术</a>\\n      <span class=\"pl\">(lyb)</span>\\n  </li>\\n</ul>\\n\\n\\n    <br/>\\n    <br/>\\n    \\n<div class=\"block5 movie_show\">\\n    <h2>最近受关注的书-编程</h2>\\n    <div class=\"content clearfix\" id=\"book_rec\">\\n            <dl>\\n                <dt><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\" \\n                href=\"https://book.douban.com/subject/35029210/\"><img src=\"https://img1.doubanio.com/view/subject/s/public/s33618069.jpg\" \\n                class=\"m_sub_img\" /></a></dt>\\n                <dd><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\"\\n                href=\"https://book.douban.com/subject/35029210/\">Scratch趣味编程：孩子的第一本编程启蒙书 小甲鱼系列</a>\\n                </dd>\\n            </dl>\\n            <dl>\\n                <dt><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\" \\n                href=\"https://book.douban.com/subject/35751619/\"><img src=\"https://img9.doubanio.com/view/subject/s/public/s34141556.jpg\" \\n                class=\"m_sub_img\" /></a></dt>\\n                <dd><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\"\\n                href=\"https://book.douban.com/subject/35751619/\">On Java 中文版 基础卷</a>\\n                </dd>\\n            </dl>\\n            <dl>\\n                <dt><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\" \\n                href=\"https://book.douban.com/subject/33408115/\"><img src=\"https://img9.doubanio.com/view/subject/s/public/s33704314.jpg\" \\n                class=\"m_sub_img\" /></a></dt>\\n                <dd><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\"\\n                href=\"https://book.douban.com/subject/33408115/\">零基础入门学习C语言：带你学C带你飞（微课视频版）</a>\\n                </dd>\\n            </dl>\\n            <div class=\"clearfix rr\" style=\"width:100%\"></div>\\n            <dl>\\n                <dt><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\" \\n                href=\"https://book.douban.com/subject/10789789/\"><img src=\"https://img2.doubanio.com/view/subject/s/public/s10307483.jpg\" \\n                class=\"m_sub_img\" /></a></dt>\\n                <dd><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\"\\n                href=\"https://book.douban.com/subject/10789789/\">C++ Primer Plus</a>\\n                </dd>\\n            </dl>\\n            <dl>\\n                <dt><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\" \\n                href=\"https://book.douban.com/subject/35879791/\"><img src=\"https://img9.doubanio.com/view/subject/s/public/s34205075.jpg\" \\n                class=\"m_sub_img\" /></a></dt>\\n                <dd><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\"\\n                href=\"https://book.douban.com/subject/35879791/\">匠艺整洁之道：程序员的职业修养</a>\\n                </dd>\\n            </dl>\\n            <dl>\\n                <dt><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\" \\n                href=\"https://book.douban.com/subject/3360807/\"><img src=\"https://img2.doubanio.com/view/subject/s/public/s3479802.jpg\" \\n                class=\"m_sub_img\" /></a></dt>\\n                <dd><a onclick=\"moreurl(this, {\\'r1001\\':\\'book-tag-top\\'})\"\\n                href=\"https://book.douban.com/subject/3360807/\">Effective java 中文版（第2版）</a>\\n                </dd>\\n            </dl>\\n            <div class=\"clearfix rr\" style=\"width:100%\"></div>\\n    </div>\\n</div>\\n\\n\\n\\n  \\n\\n\\n\\n\\n    \\n<script type=\"text/javascript\">\\n    (function (global) {\\n        var newNode = global.document.createElement(\\'script\\'),\\n            existingNode = global.document.getElementsByTagName(\\'script\\')[0],\\n            adSource = \\'//erebor.douban.com/\\',\\n            userId = \\'\\',\\n            browserId = \\'6SRIJf9RHO8\\',\\n            criteria = \\'3:/tag/编程?start=0&amp;type=T\\',\\n            preview = \\'\\',\\n            debug = false,\\n            adSlots = [\\'dale_book_tag_top_right\\'];\\n\\n        global.DoubanAdRequest = {src: adSource, uid: userId, bid: browserId, crtr: criteria, prv: preview, debug: debug};\\n        global.DoubanAdSlots = (global.DoubanAdSlots || []).concat(adSlots);\\n\\n        newNode.setAttribute(\\'type\\', \\'text/javascript\\');\\n        newNode.setAttribute(\\'src\\', \\'//img1.doubanio.com/MnJwNGlleS9mL2FkanMvY2M1OGQyNTQ2N2I2YmQzOTlmNTliMGJiMjI4MWRhZTlkNTNjYTFkZC9hZC5yZWxlYXNlLmpz\\');\\n        newNode.setAttribute(\\'async\\', true);\\n        existingNode.parentNode.insertBefore(newNode, existingNode);\\n    })(this);\\n</script>\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n      </div>\\n      <div class=\"extra\">\\n        \\n      </div>\\n    </div>\\n  </div>\\n\\n        \\n  <div id=\"footer\">\\n    \\n<span id=\"icp\" class=\"fleft gray-link\">\\n    &copy; 2005－2022 douban.com, all rights reserved 北京豆网科技有限公司\\n</span>\\n\\n<a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>\\n\\n<span class=\"fright\">\\n    <a href=\"https://www.douban.com/about\">关于豆瓣</a>\\n    · <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>\\n    · <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>\\n    · <a href=\"https://www.douban.com/about/legal\">法律声明</a>\\n    \\n    · <a href=\"https://help.douban.com/?app=book\" target=\"_blank\">帮助中心</a>\\n    · <a href=\"https://book.douban.com/library_invitation\">图书馆合作</a>\\n    · <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>\\n    · <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>\\n</span>\\n\\n  </div>\\n\\n    </div>\\n      \\n\\n    <!-- COLLECTED JS -->\\n    <!-- mako -->\\n    \\n  <script>\\n    $(function () {\\n      function update_tags(current) {\\n        html = $.map(current, function(o) {return \\'<span class=\"tags-name\">\\' + o + \\'</span><sup class=\"tags-del\"></sup> \\'}).join(\\'<span class=\"tags-add\">+</span>\\');\\n        $(\\'h1\\').html(\\'<span class=\"name\">电影标签：</span>\\' + html);\\n      };\\n\\n      function get_current_tags() {\\n        var r = [];\\n        $(\\'.tags-name\\').each(function() {r.push($(this).text())});\\n        return r;\\n      };\\n\\n      function get_current_sort_type() {\\n        url = location.href;\\n        array = url.split(\"?\")\\n        if (array.length == 1) {\\n          return \"\";\\n        }\\n        query = array[1];\\n        arr = query.split(\"&\");\\n        for (var i = 0; i < arr.length; i++) {\\n          arr2 = arr[i].split(\\'=\\');\\n          if (arr2[0] == \"type\") {\\n            if (arr2.length == 1) {\\n              return \"\";\\n            }\\n            return arr2[1];\\n          }\\n        }\\n        return \"\";\\n      };\\n\\n      function update_subject_list(current, sort_type) {\\n        $(\\'#subject_list\\').html(\\'<span class=\"pl\">载入中，请稍候...</span>\\');\\n        $(\\'#subject_list\\').load_withck(\\'/j/tag/j_subject_list\\', {tags:current.join(\\' \\'), type:sort_type}, function() {});\\n      };\\n\\n      function update_related_tags_and_subject(current, sort_type) {\\n        update_related_tags(current, sort_type);\\n        // update_subject_list(current, sort_type);\\n      };\\n\\n      function update_related_tags(current, sort_type) {\\n        $(\\'#related_tags\\').load_withck(\\'/j/tag/j_related_tag\\', {tags:current.join(\\' \\'), type:sort_type}, function() {\\n          $(\\'.more\\').toggle(\\n            function () {\\n              $(\\'.tags-hide\\').css(\\'display\\', \\'inline\\');\\n              $(this).text(\\'收起▲\\');\\n            },\\n            function () {\\n              $(\\'.tags-hide\\').hide();\\n              $(this).text(\\'更多▼\\');\\n            }\\n          );\\n          $(\\'.tags-del\\').click(function () {\\n            if($(this).prev().prev().text() == \\'+\\') {\\n              $(this).prev().prev().remove();\\n            } else if ($(this).next().text() == \\'+\\') {\\n              $(this).next().remove();\\n            }\\n            $(this).prev().remove().end().remove();\\n            current = get_current_tags();\\n            if (current.length == 0){\\n              document.location.href = \\'/tag/\\';\\n            } else {\\n              //setHash(current.join(\\' \\'));\\n              //location.href = \\'/tag/\\' + (location.href).split(\\'#\\')[1] + \\'?type=\\' + sort_type;\\n              sort_type = get_current_sort_type();\\n              location.href = \\'/tag/\\' + current.join(\\' \\') + \\'?type=\\' + sort_type;\\n            }\\n          });\\n          $(\\'.add-tag\\').click(function () {\\n            current = get_current_tags();\\n            current.push($(this).text());\\n            update_tags(current);\\n            //setHash(current.join(\\' \\'));\\n            //location.href = \\'/tag/\\' + (location.href).split(\\'#\\')[1] + \\'?type=\\' + sort_type;\\n            sort_type = get_current_sort_type();\\n            location.href = \\'/tag/\\' + current.join(\\' \\') + \\'?type=\\' + sort_type;\\n          });\\n          $(\\'.tagsInput\\').keypress(function (e) {\\n            if (e.which == 13) {\\n              current = get_current_tags();\\n              current.push($(this).val());\\n              update_tags(current);\\n              sort_type = get_current_sort_type();\\n              //setHash(current.join(\\' \\'));\\n              //location.href = \\'/tag/\\' + (location.href).split(\\'#\\')[1] + \\'?type=\\' + sort_type;\\n              location.href = \\'/tag/\\' + current.join(\\' \\') + \\'?type=\\' + sort_type;\\n            }\\n          });\\n          checkInput($(\\'.tagsInput\\'));\\n        });\\n      };\\n\\n      current = get_current_tags();\\n      sort_type = get_current_sort_type();\\n      update_related_tags_and_subject(current, sort_type);\\n\\n      function checkInput (o) {\\n        if (!o.val() || o.val() == o.attr(\\'title\\')) {\\n          o.addClass(\\'greyinput\\');\\n          o.val(o.attr(\\'title\\'));\\n        }\\n        o.focus(function(){\\n          o.removeClass(\\'greyinput\\');\\n          if(o.val() == o.attr(\\'title\\')) o.val(\\'\\');\\n        });\\n        o.blur(function(){\\n          if(!o.val()){\\n            o.addClass(\\'greyinput\\');\\n            o.val(o.attr(\\'title\\'));\\n          }\\n        });\\n      }\\n\\n      if($.browser.msie && $.browser.version == 6.0) {\\n        $(\\'.tags-del\\').hover(\\n          function () { $(this).addClass(\\'tags-hover\\'); },\\n          function () { $(this).removeClass(\\'tags-hover\\'); }\\n        );\\n      }\\n      if (location.href.split(\\'#\\').length > 1) {\\n        //changeUrl ();\\n      }\\n\\n  });\\n\\n  function setHash (a) {\\n    $.browser.msie?$.locationHash(a):location.hash = a;\\n  }\\n  </script>\\n\\n    \\n  \\n\\n<script type=\"text/javascript\">\\n  var _paq = _paq || [];\\n  _paq.push([\\'trackPageView\\']);\\n  _paq.push([\\'enableLinkTracking\\']);\\n  (function() {\\n    var p=((\\'https:\\' == document.location.protocol) ? \\'https\\' : \\'http\\'), u=p+\\'://fundin.douban.com/\\';\\n    _paq.push([\\'setTrackerUrl\\', u+\\'piwik\\']);\\n    _paq.push([\\'setSiteId\\', \\'100001\\']);\\n    var d=document, g=d.createElement(\\'script\\'), s=d.getElementsByTagName(\\'script\\')[0]; \\n    g.type=\\'text/javascript\\';\\n    g.defer=true; \\n    g.async=true; \\n    g.src=p+\\'://s.doubanio.com/dae/fundin/piwik.js\\';\\n    s.parentNode.insertBefore(g,s);\\n  })();\\n</script>\\n\\n<script type=\"text/javascript\">\\nvar setMethodWithNs = function(namespace) {\\n  var ns = namespace ? namespace + \\'.\\' : \\'\\'\\n    , fn = function(string) {\\n        if(!ns) {return string}\\n        return ns + string\\n      }\\n  return fn\\n}\\n\\nvar gaWithNamespace = function(fn, namespace) {\\n  var method = setMethodWithNs(namespace)\\n  fn.call(this, method)\\n}\\n\\nvar _gaq = _gaq || []\\n  , accounts = [\\n      { id: \\'UA-7019765-1\\', namespace: \\'douban\\' }\\n    , { id: \\'UA-7019765-16\\', namespace: \\'\\' }\\n    ]\\n  , gaInit = function(account) {\\n      gaWithNamespace(function(method) {\\n        gaInitFn.call(this, method, account)\\n      }, account.namespace)\\n    }\\n  , gaInitFn = function(method, account) {\\n      _gaq.push([method(\\'_setAccount\\'), account.id])\\n\\n      \\n  _gaq.push([method(\\'_addOrganic\\'), \\'google\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'baidu\\', \\'wd\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'soso\\', \\'w\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'youdao\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'so.360.cn\\', \\'q\\'])\\n  _gaq.push([method(\\'_addOrganic\\'), \\'sogou\\', \\'query\\'])\\n  if (account.namespace) {\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'douban\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'豆瓣网\\'])\\n    _gaq.push([method(\\'_addIgnoredOrganic\\'), \\'www.douban.com\\'])\\n  }\\n\\n      if (account.namespace === \\'douban\\') {\\n        _gaq.push([method(\\'_setDomainName\\'), \\'.douban.com\\'])\\n      }\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 1, \\'responsive_view_mode\\', \\'desktop\\', 3])\\n\\n        _gaq.push([method(\\'_setCustomVar\\'), 2, \\'login_status\\', \\'0\\', 2]);\\n\\n      _gaq.push([method(\\'_trackPageview\\')])\\n    }\\n\\nfor(var i = 0, l = accounts.length; i < l; i++) {\\n  var account = accounts[i]\\n  gaInit(account)\\n}\\n\\n\\n;(function() {\\n    var ga = document.createElement(\\'script\\');\\n    ga.src = (\\'https:\\' == document.location.protocol ? \\'https://ssl\\' : \\'http://www\\') + \\'.google-analytics.com/ga.js\\';\\n    ga.setAttribute(\\'async\\', \\'true\\');\\n    document.documentElement.firstChild.appendChild(ga);\\n})()\\n</script>\\n\\n\\n\\n\\n\\n\\n\\n\\n    <!-- dae-web-book--default-688797c-z79zx-->\\n\\n</body>\\n</html>\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "19960dff",
   "metadata": {},
   "source": [
    "### 解析数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "7eb69102",
   "metadata": {},
   "outputs": [],
   "source": [
    "import re"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "2a49180b",
   "metadata": {},
   "outputs": [],
   "source": [
    "from bs4 import BeautifulSoup"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "53f060b2",
   "metadata": {},
   "outputs": [],
   "source": [
    "soup = BeautifulSoup(data, \"html.parser\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "a01f391d",
   "metadata": {},
   "outputs": [],
   "source": [
    "items = soup.find_all(\"li\", class_=\"subject-item\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "32c74c61",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "编程珠玑 [美] Jon Bentley 黄倩、钱丽艳、刘田(审校) 人民邮电出版社 2008-10 39.00元 9.1 2174\n",
      "Vue.js设计与实现      9.2 60\n",
      "重构（第2版）:改善既有代码的设计 [美] Martin Fowler 熊节、林从羽 人民邮电出版社 2019-3 168.00元 9.1 321\n",
      "Python编程:从入门到实践（第2版） [美]埃里克·马瑟斯（Eric Matthes） 袁国忠 人民邮电出版社 2020-10 89 9.2 894\n",
      "编码:隐匿在计算机软硬件背后的语言 [美] Charles Petzold 左飞、薛佟佟 电子工业出版社 2010 55.00元 9.3 4540\n",
      "Java核心技术·卷I（原书第11版）:基础知识 [美] 凯 S.霍斯特曼（Cay S.Horstmann） 林琪、苏钰涵 机械工业出版社 2019-11-25 149元 9.4 242\n",
      "深入理解计算机系统（原书第3版） Randal E.Bryant、David O'Hallaron 龚奕利、贺莲 机械工业出版社 2016-11 139.00元 9.8 1833\n",
      "Python编程:从入门到实践 [美] 埃里克·马瑟斯 袁国忠 人民邮电出版社 2016-7-1 89.00元 9.1 3815\n",
      "Python工匠:案例、技巧与工程实践       33\n",
      "凤凰架构:构建可靠的大型分布式系统 周志明  机械工业出版社 2021-6-30 99.00 9.1 327\n",
      "计算机程序的构造和解释(原书第2版) [美] Harold Abelson、[美] Gerald Jay Sussman、[美] Julie Sussman 裘宗燕 机械工业出版社 2004-2 45.00元 9.5 2572\n",
      "EffectiveJava中文版（第3版） [美] Joshua Bloch 俞黎敏 机械工业出版社 2018-12-11 119元 9.3 270\n",
      "C程序设计语言（第2版·新版） [美] Brian W. Kernighan、[美] Dennis M. Ritchie 徐宝文、李志译、尤晋元审校 机械工业出版社 2004-1 30.00元 9.4 4935\n",
      "设计数据密集型应用（影印版） Martin Kleppmann  东南大学出版社 2017-10-1 99.00元 9.9 219\n",
      "Scratch趣味编程：孩子的第一本编程启蒙书小甲鱼系列:小甲鱼系列      0 10\n",
      "计算机程序设计艺术・卷1:基本算法（第3版） Donald E. Knuth 李伯民、范明、蒋爱军 人民邮电出版社 2016-1-1 198 9.5 61\n",
      "EffectivePython:编写高质量Python代码的90个有效方法（原书第2版） [美] 布雷特·斯拉特金 爱飞翔 机械工业出版社 2021-1 129 9.0 73\n",
      "代码大全（第2版） [美] 史蒂夫·迈克康奈尔 金戈、汤凌、陈硕、张菲 译、裘宗燕 审校 电子工业出版社 2006-3 128.00元 9.3 4092\n",
      "计算之魂:计算科学品位和认知进阶 吴军  人民邮电出版社 2021-11 109 9.4 142\n",
      "代码整洁之道 [美] Robert C. Martin 韩磊 人民邮电出版社 2020-2 99.00元 8.7 89\n"
     ]
    }
   ],
   "source": [
    "for item in items:\n",
    "    title = item.find(\"h2\").find(\"a\").get_text()\n",
    "    title = re.sub(r\"\\s\", \"\", title)\n",
    "    \n",
    "    pub = item.find(\"div\", class_=\"pub\").get_text()\n",
    "    pubs = [str(x).strip() for x in pub.split(\"/\")]\n",
    "    author, translator, publisher, pubdate, price = [\"\"]* 5\n",
    "    if len(pubs) == 4:\n",
    "        author, publisher, pubdate, price = pubs\n",
    "    elif len(pubs) == 5:\n",
    "        author, translator, publisher, pubdate, price = pubs\n",
    "    \n",
    "    rating_nums = 0\n",
    "    rating_nums_node = item.find(\"span\", class_=\"rating_nums\")\n",
    "    if rating_nums_node:\n",
    "        rating_nums = rating_nums_node.get_text()\n",
    "    \n",
    "    comments = item.find(\"span\", class_=\"pl\").get_text()\n",
    "    match = re.search(r\"(\\d+)人评价\", comments)\n",
    "    if match:\n",
    "        comments = match.groups()[0]\n",
    "    \n",
    "    \n",
    "    print(title, author, translator, publisher, pubdate, price, rating_nums, comments)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4ebb3b2b",
   "metadata": {},
   "source": [
    "### 封装成函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "a41aef20",
   "metadata": {},
   "outputs": [],
   "source": [
    "def craw_url(url):\n",
    "    resp = requests.get(url, headers=headers)\n",
    "    return resp.text"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "19486a2c",
   "metadata": {},
   "outputs": [],
   "source": [
    "def parse_datas(html):\n",
    "    datas = []\n",
    "    \n",
    "    soup = BeautifulSoup(html, \"html.parser\")\n",
    "    items = soup.find_all(\"li\", class_=\"subject-item\")\n",
    "    for item in items:\n",
    "        title = item.find(\"h2\").find(\"a\").get_text()\n",
    "        title = re.sub(r\"\\s\", \"\", title)\n",
    "\n",
    "        pub = item.find(\"div\", class_=\"pub\").get_text()\n",
    "        pubs = [str(x).strip() for x in pub.split(\"/\")]\n",
    "        author, translator, publisher, pubdate, price = [\"\"]* 5\n",
    "        if len(pubs) == 4:\n",
    "            author, publisher, pubdate, price = pubs\n",
    "        elif len(pubs) == 5:\n",
    "            author, translator, publisher, pubdate, price = pubs\n",
    "    \n",
    "        rating_nums = 0\n",
    "        if item.find(\"span\", class_=\"rating_nums\"):\n",
    "            rating_nums = item.find(\"span\", class_=\"rating_nums\").get_text()\n",
    "\n",
    "        comments = item.find(\"span\", class_=\"pl\").get_text()\n",
    "        match = re.search(r\"(\\d+)人评价\", comments)\n",
    "        if match:\n",
    "            comments = match.groups()[0]\n",
    "        if not str(comments).isnumeric():\n",
    "            comments = 0\n",
    "\n",
    "        datas.append([title, author, translator, publisher, pubdate, price, rating_nums, comments])\n",
    "    return datas"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "b1e52ba2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['编程珠玑',\n",
       " '[美] Jon Bentley',\n",
       " '黄倩、钱丽艳、刘田(审校)',\n",
       " '人民邮电出版社',\n",
       " '2008-10',\n",
       " '39.00元',\n",
       " '9.1',\n",
       " '2174']"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "html = craw_url(url)\n",
    "datas = parse_datas(html)\n",
    "datas[0]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d948b2e9",
   "metadata": {},
   "source": [
    "### 批量爬取合并"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "551a3a1c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "b20897b2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=0&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=20&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=40&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=60&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=80&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=100&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=120&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=140&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=160&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=180&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=200&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=220&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=240&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=260&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=280&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=300&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=320&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=340&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=360&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=380&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=400&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=420&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=440&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=460&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=480&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=500&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=520&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=540&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=560&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=580&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=600&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=620&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=640&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=660&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=680&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=700&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=720&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=740&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=760&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=780&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=800&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=820&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=840&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=860&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=880&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=900&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=920&type=T\n",
      "craw url: https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start=940&type=T\n"
     ]
    }
   ],
   "source": [
    "all_datas = []\n",
    "for page in range(0, 960, 20):\n",
    "    url = f\"https://book.douban.com/tag/%E7%BC%96%E7%A8%8B?start={page}&type=T\"\n",
    "    print(\"craw url:\", url)\n",
    "    html = craw_url(url)\n",
    "    datas = parse_datas(html)\n",
    "    all_datas.extend(datas)\n",
    "    time.sleep(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "f7356bb5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "948"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(all_datas)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3f935a4a",
   "metadata": {},
   "source": [
    "### 输出excel文件"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "a6488ba9",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "9d0c5762",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>translator</th>\n",
       "      <th>publisher</th>\n",
       "      <th>pubdate</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_nums</th>\n",
       "      <th>comments</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>编程珠玑</td>\n",
       "      <td>[美] Jon Bentley</td>\n",
       "      <td>黄倩、钱丽艳、刘田(审校)</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2008-10</td>\n",
       "      <td>39.00元</td>\n",
       "      <td>9.1</td>\n",
       "      <td>2174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Vue.js设计与实现</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>9.2</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>重构（第2版）:改善既有代码的设计</td>\n",
       "      <td>[美] Martin Fowler</td>\n",
       "      <td>熊节、林从羽</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2019-3</td>\n",
       "      <td>168.00元</td>\n",
       "      <td>9.1</td>\n",
       "      <td>321</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python编程:从入门到实践（第2版）</td>\n",
       "      <td>[美]埃里克·马瑟斯（Eric Matthes）</td>\n",
       "      <td>袁国忠</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2020-10</td>\n",
       "      <td>89</td>\n",
       "      <td>9.2</td>\n",
       "      <td>894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>编码:隐匿在计算机软硬件背后的语言</td>\n",
       "      <td>[美] Charles Petzold</td>\n",
       "      <td>左飞、薛佟佟</td>\n",
       "      <td>电子工业出版社</td>\n",
       "      <td>2010</td>\n",
       "      <td>55.00元</td>\n",
       "      <td>9.3</td>\n",
       "      <td>4540</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  title                    author     translator publisher  \\\n",
       "0                  编程珠玑           [美] Jon Bentley  黄倩、钱丽艳、刘田(审校)   人民邮电出版社   \n",
       "1           Vue.js设计与实现                                                      \n",
       "2     重构（第2版）:改善既有代码的设计         [美] Martin Fowler         熊节、林从羽   人民邮电出版社   \n",
       "3  Python编程:从入门到实践（第2版）  [美]埃里克·马瑟斯（Eric Matthes）            袁国忠   人民邮电出版社   \n",
       "4     编码:隐匿在计算机软硬件背后的语言       [美] Charles Petzold         左飞、薛佟佟   电子工业出版社   \n",
       "\n",
       "   pubdate    price rating_nums comments  \n",
       "0  2008-10   39.00元         9.1     2174  \n",
       "1                           9.2       60  \n",
       "2   2019-3  168.00元         9.1      321  \n",
       "3  2020-10       89         9.2      894  \n",
       "4     2010   55.00元         9.3     4540  "
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(\n",
    "    all_datas,\n",
    "    columns=\"title, author, translator, publisher, pubdate, price, rating_nums, comments\".split(\", \")\n",
    ")\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "0bfd9ee8",
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_pubdate(pubdate):\n",
    "    match = re.search(r\"(\\d{4})\", pubdate)\n",
    "    if match:\n",
    "        return match.groups()[0]\n",
    "    return \"1970\"\n",
    "df[\"pubdate\"] = df[\"pubdate\"].map(get_pubdate)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "a8d25968",
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_price(price):\n",
    "    match = re.search(r\"([1-9]\\d*\\.?\\d*)\", price)\n",
    "    if match:\n",
    "        return match.groups()[0]\n",
    "    return 0.0\n",
    "df[\"price\"] = df[\"price\"].map(get_price)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "f22ca58c",
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_rating_nums(rating_nums):\n",
    "    match = re.search(r\"([1-9]\\d*\\.?\\d*)\", str(rating_nums))\n",
    "    if match:\n",
    "        return match.groups()[0]\n",
    "    return 0.0\n",
    "df[\"rating_nums\"] = df[\"rating_nums\"].map(get_rating_nums)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "7a43102d",
   "metadata": {},
   "outputs": [],
   "source": [
    "df[\"rating_nums\"] = df[\"rating_nums\"].astype(float)\n",
    "df[\"price\"] = df[\"price\"].astype(float)\n",
    "df[\"pubdate\"] = df[\"pubdate\"].astype(int)\n",
    "df[\"comments\"] = df[\"comments\"].astype(int)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "40731bd8",
   "metadata": {},
   "outputs": [],
   "source": [
    "for column in [\"title\", \"author\", \"translator\", \"publisher\"]:\n",
    "    df[column] = df[column].map(lambda x : x.replace(\"'\", \"\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "cd12dfa7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>translator</th>\n",
       "      <th>publisher</th>\n",
       "      <th>pubdate</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_nums</th>\n",
       "      <th>comments</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>编程珠玑</td>\n",
       "      <td>[美] Jon Bentley</td>\n",
       "      <td>黄倩、钱丽艳、刘田(审校)</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2008</td>\n",
       "      <td>39.0</td>\n",
       "      <td>9.1</td>\n",
       "      <td>2174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Vue.js设计与实现</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>1970</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9.2</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>重构（第2版）:改善既有代码的设计</td>\n",
       "      <td>[美] Martin Fowler</td>\n",
       "      <td>熊节、林从羽</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2019</td>\n",
       "      <td>168.0</td>\n",
       "      <td>9.1</td>\n",
       "      <td>321</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python编程:从入门到实践（第2版）</td>\n",
       "      <td>[美]埃里克·马瑟斯（Eric Matthes）</td>\n",
       "      <td>袁国忠</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2020</td>\n",
       "      <td>89.0</td>\n",
       "      <td>9.2</td>\n",
       "      <td>894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>编码:隐匿在计算机软硬件背后的语言</td>\n",
       "      <td>[美] Charles Petzold</td>\n",
       "      <td>左飞、薛佟佟</td>\n",
       "      <td>电子工业出版社</td>\n",
       "      <td>2010</td>\n",
       "      <td>55.0</td>\n",
       "      <td>9.3</td>\n",
       "      <td>4540</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  title                    author     translator publisher  \\\n",
       "0                  编程珠玑           [美] Jon Bentley  黄倩、钱丽艳、刘田(审校)   人民邮电出版社   \n",
       "1           Vue.js设计与实现                                                      \n",
       "2     重构（第2版）:改善既有代码的设计         [美] Martin Fowler         熊节、林从羽   人民邮电出版社   \n",
       "3  Python编程:从入门到实践（第2版）  [美]埃里克·马瑟斯（Eric Matthes）            袁国忠   人民邮电出版社   \n",
       "4     编码:隐匿在计算机软硬件背后的语言       [美] Charles Petzold         左飞、薛佟佟   电子工业出版社   \n",
       "\n",
       "   pubdate  price  rating_nums  comments  \n",
       "0     2008   39.0          9.1      2174  \n",
       "1     1970    0.0          9.2        60  \n",
       "2     2019  168.0          9.1       321  \n",
       "3     2020   89.0          9.2       894  \n",
       "4     2010   55.0          9.3      4540  "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "fb475db7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>pubdate</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_nums</th>\n",
       "      <th>comments</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>948.000000</td>\n",
       "      <td>948.000000</td>\n",
       "      <td>948.000000</td>\n",
       "      <td>948.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>2009.958861</td>\n",
       "      <td>85.865316</td>\n",
       "      <td>6.970886</td>\n",
       "      <td>346.803797</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>13.218311</td>\n",
       "      <td>171.713229</td>\n",
       "      <td>3.385910</td>\n",
       "      <td>1103.545675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>1970.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>2008.000000</td>\n",
       "      <td>47.365000</td>\n",
       "      <td>7.400000</td>\n",
       "      <td>25.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>2014.000000</td>\n",
       "      <td>69.000000</td>\n",
       "      <td>8.400000</td>\n",
       "      <td>88.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>2018.000000</td>\n",
       "      <td>98.000000</td>\n",
       "      <td>9.000000</td>\n",
       "      <td>251.250000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>2022.000000</td>\n",
       "      <td>2021.000000</td>\n",
       "      <td>10.000000</td>\n",
       "      <td>21684.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           pubdate        price  rating_nums      comments\n",
       "count   948.000000   948.000000   948.000000    948.000000\n",
       "mean   2009.958861    85.865316     6.970886    346.803797\n",
       "std      13.218311   171.713229     3.385910   1103.545675\n",
       "min    1970.000000     0.000000     0.000000      0.000000\n",
       "25%    2008.000000    47.365000     7.400000     25.000000\n",
       "50%    2014.000000    69.000000     8.400000     88.000000\n",
       "75%    2018.000000    98.000000     9.000000    251.250000\n",
       "max    2022.000000  2021.000000    10.000000  21684.000000"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "98693fa1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>author</th>\n",
       "      <th>translator</th>\n",
       "      <th>publisher</th>\n",
       "      <th>pubdate</th>\n",
       "      <th>price</th>\n",
       "      <th>rating_nums</th>\n",
       "      <th>comments</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>编程珠玑</td>\n",
       "      <td>[美] Jon Bentley</td>\n",
       "      <td>黄倩、钱丽艳、刘田(审校)</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2008</td>\n",
       "      <td>39.00</td>\n",
       "      <td>9.1</td>\n",
       "      <td>2174</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>重构（第2版）:改善既有代码的设计</td>\n",
       "      <td>[美] Martin Fowler</td>\n",
       "      <td>熊节、林从羽</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2019</td>\n",
       "      <td>168.00</td>\n",
       "      <td>9.1</td>\n",
       "      <td>321</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Python编程:从入门到实践（第2版）</td>\n",
       "      <td>[美]埃里克·马瑟斯（Eric Matthes）</td>\n",
       "      <td>袁国忠</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2020</td>\n",
       "      <td>89.00</td>\n",
       "      <td>9.2</td>\n",
       "      <td>894</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>编码:隐匿在计算机软硬件背后的语言</td>\n",
       "      <td>[美] Charles Petzold</td>\n",
       "      <td>左飞、薛佟佟</td>\n",
       "      <td>电子工业出版社</td>\n",
       "      <td>2010</td>\n",
       "      <td>55.00</td>\n",
       "      <td>9.3</td>\n",
       "      <td>4540</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Java核心技术·卷I（原书第11版）:基础知识</td>\n",
       "      <td>[美] 凯 S.霍斯特曼（Cay S.Horstmann）</td>\n",
       "      <td>林琪、苏钰涵</td>\n",
       "      <td>机械工业出版社</td>\n",
       "      <td>2019</td>\n",
       "      <td>149.00</td>\n",
       "      <td>9.4</td>\n",
       "      <td>242</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>943</th>\n",
       "      <td>PHP5权威编程</td>\n",
       "      <td>(美)古曼兹等</td>\n",
       "      <td>简张桂</td>\n",
       "      <td>电子工业出版社</td>\n",
       "      <td>2007</td>\n",
       "      <td>90.00</td>\n",
       "      <td>7.6</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>944</th>\n",
       "      <td>图解机器学习</td>\n",
       "      <td>杉山将</td>\n",
       "      <td>许永伟</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2015</td>\n",
       "      <td>49.00</td>\n",
       "      <td>6.4</td>\n",
       "      <td>205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>945</th>\n",
       "      <td>JavaScript面向对象精要</td>\n",
       "      <td>Nicholas C. Zakas</td>\n",
       "      <td>胡世杰</td>\n",
       "      <td>人民邮电出版社</td>\n",
       "      <td>2015</td>\n",
       "      <td>39.00</td>\n",
       "      <td>8.9</td>\n",
       "      <td>146</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>946</th>\n",
       "      <td>TheDefinitiveGuidetoDjango,2ndEdition:WebDevel...</td>\n",
       "      <td>Adrian Holovaty、Jacob Kaplan-Moss</td>\n",
       "      <td></td>\n",
       "      <td>Apress</td>\n",
       "      <td>2009</td>\n",
       "      <td>44.99</td>\n",
       "      <td>9.0</td>\n",
       "      <td>107</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>947</th>\n",
       "      <td>Web开发敏捷之道:应用Rails进行敏捷Web开发(第2版)</td>\n",
       "      <td>托马斯（Thomas,D.）、汉松（Hansson, D.H.）</td>\n",
       "      <td>林芷薰</td>\n",
       "      <td>电子工业出版社</td>\n",
       "      <td>2007</td>\n",
       "      <td>95.00</td>\n",
       "      <td>9.1</td>\n",
       "      <td>229</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>872 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                 title  \\\n",
       "0                                                 编程珠玑   \n",
       "2                                    重构（第2版）:改善既有代码的设计   \n",
       "3                                 Python编程:从入门到实践（第2版）   \n",
       "4                                    编码:隐匿在计算机软硬件背后的语言   \n",
       "5                             Java核心技术·卷I（原书第11版）:基础知识   \n",
       "..                                                 ...   \n",
       "943                                           PHP5权威编程   \n",
       "944                                             图解机器学习   \n",
       "945                                   JavaScript面向对象精要   \n",
       "946  TheDefinitiveGuidetoDjango,2ndEdition:WebDevel...   \n",
       "947                    Web开发敏捷之道:应用Rails进行敏捷Web开发(第2版)   \n",
       "\n",
       "                                author     translator publisher  pubdate  \\\n",
       "0                      [美] Jon Bentley  黄倩、钱丽艳、刘田(审校)   人民邮电出版社     2008   \n",
       "2                    [美] Martin Fowler         熊节、林从羽   人民邮电出版社     2019   \n",
       "3             [美]埃里克·马瑟斯（Eric Matthes）            袁国忠   人民邮电出版社     2020   \n",
       "4                  [美] Charles Petzold         左飞、薛佟佟   电子工业出版社     2010   \n",
       "5        [美] 凯 S.霍斯特曼（Cay S.Horstmann）         林琪、苏钰涵   机械工业出版社     2019   \n",
       "..                                 ...            ...       ...      ...   \n",
       "943                            (美)古曼兹等            简张桂   电子工业出版社     2007   \n",
       "944                                杉山将            许永伟   人民邮电出版社     2015   \n",
       "945                  Nicholas C. Zakas            胡世杰   人民邮电出版社     2015   \n",
       "946  Adrian Holovaty、Jacob Kaplan-Moss                   Apress     2009   \n",
       "947   托马斯（Thomas,D.）、汉松（Hansson, D.H.）            林芷薰   电子工业出版社     2007   \n",
       "\n",
       "      price  rating_nums  comments  \n",
       "0     39.00          9.1      2174  \n",
       "2    168.00          9.1       321  \n",
       "3     89.00          9.2       894  \n",
       "4     55.00          9.3      4540  \n",
       "5    149.00          9.4       242  \n",
       "..      ...          ...       ...  \n",
       "943   90.00          7.6       100  \n",
       "944   49.00          6.4       205  \n",
       "945   39.00          8.9       146  \n",
       "946   44.99          9.0       107  \n",
       "947   95.00          9.1       229  \n",
       "\n",
       "[872 rows x 8 columns]"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df[\"pubdate\"]!=1970]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "c99c7b82",
   "metadata": {},
   "outputs": [],
   "source": [
    "df[df[\"pubdate\"]!=1970].to_excel(\"豆瓣读取-编程分类排行榜.xlsx\", index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d11fe613",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
